package com.corticon.dialogs.model;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;


/**
 * QuestionStatusType entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "qs_questionstatustype")
public class QuestionStatusType implements Serializable {

    private String code;
    private String description;
    private String name;
    private Set<Question> questions = new HashSet<Question>();
    private Set<QuestionSet> questionSets = new HashSet<QuestionSet>();

    public QuestionStatusType() {
    }

    @GenericGenerator(name = "generator", strategy = "uuid.hex")
    @Id
    @GeneratedValue(generator = "generator")
    @Column(name = "code", nullable = false, length = 256)
    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Column(name = "description", length = 256)
    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Column(name = "name", length = 256)
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @OneToMany(mappedBy = "questionStatusType")
    public Set<Question> getQuestions() {
        return this.questions;
    }

    public void setQuestions(Set<Question> questions) {
        this.questions = questions;
    }

    @OneToMany(mappedBy = "status")
    public Set<QuestionSet> getQuestionSets() {
        return this.questionSets;
    }

    public void setQuestionSets(Set<QuestionSet> questionSets) {
        this.questionSets = questionSets;
    }
}